<template>
    <div>
        <h3><center>个人病历</center></h3>
        <center><div style="font-size: larger">
            <span >姓名：{{user.name}}</span>
            <span style="margin-left: 50px">性别：{{user.sex}}</span>
        </div></center>
        <el-form  label-width="80px" class="login-box">
            <el-table
                    :data="tableData"
                    stripe
                    style="width: 100%">
                <el-table-column
                        prop="date"
                        label="日期"
                        width="180"
                        align="center">
                </el-table-column>
                <el-table-column
                        prop="doctor_name"
                        label="主治医师"
                        width="180"
                        align="center"
                >
                </el-table-column>
                <el-table-column
                        prop="illness_name"
                        label="病因"
                        width="180"
                >
                </el-table-column>
                <el-table-column
                        prop="plan"
                        label="治疗方案"
                        align="center">
                </el-table-column>
            </el-table>
            <router-link to="/prescribe"><el-button type="primary" style="float: right;" >打印病历</el-button></router-link>
        </el-form>
    </div>
</template>

<script>
    export default {
        name: "PatientCase",
        data(){
            return{
                user:{
                    name:'黎明',
                    sex:'男'
                },
                tableData: [{
                    date: '2016-05-02',
                    illness_name: '糖尿病',
                    doctor_name:'李刚',
                    plan: '餐前注射胰岛素'
                }, {
                    date: '2016-05-04',
                    doctor_name:'王菲',
                    illness_name: '腰间盘突出压迫神经',
                    plan: '中药调理'
                }, {
                    date: '2016-05-01',
                    illness_name: '半月板受损二度',
                    doctor_name:'王菲',
                    plan: '外科手术缝补修复'
                }, {
                    date: '2016-05-03',
                    doctor_name:'王菲',
                    illness_name: '感冒',
                    plan: '板蓝根和999混喝'
                }]
            }

        }
    }
</script>

<style scoped>
    .login-box{
        margin: 20px auto;

    }
</style>